package com.summer.framework.bill.controller.rest;


import com.summer.framework.api.feign.service.admin.UserApiService;
import com.summer.framework.common.entity.Users;
import com.summer.framework.common.entity.response.ObjectResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @auther: 杨杰
 * @date: 2018/12/24 16:15
 * @description:
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {

    @Resource
    private UserApiService userService;


    @GetMapping("/getUserByName/{userName}")
    public ObjectResponse<Users> user(@PathVariable String userName) {
        log.info("getUserByName:" + userName);
        return new ObjectResponse<>(userService.getUserByName(userName));
    }


}
